import React, { Component } from 'react';
import './App.css';
import {observable,computed} from 'mobx'
import {observer} from 'mobx-react'
import store from './store'
@observer
class App extends Component {
  store=new store();
  constructor(props){
    super(props);
    console.log(this.props);
    setInterval(()=>{
      this.store.timer++;
    },1000)
  }
  componentDidMount(){
    console.log(2);
  }
  componentWillReact(){
    console.log(1);
  }
  render() {
    return (
      <div>
        {this.store.timer}
      </div>
    );
  }
}

export default App;
